using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

namespace BlockOS.Client
{
    public class StartWindow : Window
    {
        public HUDWindow hudWindowPrefab;
        public InputAction startAction;


        protected override void Awake()
        {
            startAction.performed += OnStartPress;
        }

        private void OnStartPress(InputAction.CallbackContext obj)
        {
            manager.PushWindow(hudWindowPrefab);
        }

        public override void OnShow()
        {
            startAction.Enable();
        }

        public override void OnHide()
        {
            startAction.Disable();
        }

        protected override void OnDestroy()
        {
            startAction.Dispose();
        }
    }
}
